package com.mrper.analysis

import android.view.View

class ViewOnClickListener(
    private val onClickHandle: (View) -> Unit
) : View.OnClickListener {

    override fun onClick(v: View) = onClickHandle.invoke(v)

}

fun View.setOnClick(onClick: (View) -> Unit) {
    setOnClickListener(ViewOnClickListener { onClick(it) })
}